﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

using System.Runtime.InteropServices;
using System.Reflection;

using SolidWorks.Interop.sldworks;
using SolidWorks.Interop.swcommands;
using SolidWorks.Interop.swconst;
using SolidWorks.Interop.swpublished;

using SwAddinHelpers.Contracts;
using SwAddinHelpers.TaskPane;
using SwAddinHelpers.PropertyManager;
using SwAddinHelpers.Sinks;
using SwAddinHelpers.CommandManager;
using SwAddinHelpers.MenuManager;

namespace SwAddinHelpers.Base
{
    [ComVisible(true)]
    public class UserControlBase: UserControl
    {
        public bool IsCreated = false;

        protected UserControlHostBase _OwnerHost { get; private set; }

        public virtual UserControlHostBase SetOwner
        {
            set
            {
                _OwnerHost = value;
                ThrowOnOwnerHostSetter();
            }
        }

        protected virtual void ThrowOnOwnerHostSetter() 
        { }

        public virtual void Tie() { }

        public virtual void Untie() { }
    }
}
